data = load('data.mat');
rgb1 = data.rgb1;
rgb2 = data.rgb2;
rgb3 = data.rgb3;
test = data.C1_2V;

d=1;

disp('<a href="">Bayes sans fisher</a>');
[failure1 success1] = mBayes(rgb1(:,d:3), rgb2(:,d:3), test(:,d:3), 1)


disp('<a href="">Bayes avec fisher</a>');
M = x(rgb1(:,d:3), rgb2(:,d:3), rgb3(:,d:3));
rgb1_f = M*rgb1(:,d:3)';
rgb2_f = M*rgb2(:,d:3)';
test_f = M*test(:,d:3)';
rgb1_f = rgb1_f';
rgb2_f = rgb2_f';
test_f = test_f';

[failure2 success2] = mBayes(rgb1_f, rgb2_f, test_f, 1)